﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BreacherCreature.GameObjects.Tiles
{
    class Crate : SightBlocker
    {
        static Dictionary<CrateSprites, string> _spriteNames;

        private const int SIZE = 100;

        static Crate()
        {
            _spriteNames = new Dictionary<CrateSprites, string>()
            {
                { CrateSprites.Normal, "CrateNormal" },
                { CrateSprites.Rusty, "CrateRusty" },
                { CrateSprites.Rusty2, "CrateRusty2" }
            };
        }

        public Crate(CrateSprites crateSprite, int x, int y) 
            : base(_spriteNames[crateSprite], DrawDepths.CRATE, x, y, SIZE, SIZE) 
        {
 
        }

        public Crate(string crateSprite, string x, string y)
            : this((CrateSprites)(Enum.Parse(typeof(CrateSprites), crateSprite)),
                  int.Parse(x),
                  int.Parse(y))
        {

        }
    }

    public enum CrateSprites
    {
        Normal,
        Rusty,
        Rusty2
    }
}
